package com.dycn.posdashboard.dbhelper;

import java.sql.DriverManager;
import java.sql.SQLException;

import org.apache.commons.dbcp.BasicDataSource;

/**
 * 系统退出时关闭数据库连接
 * @author gongqiyi
 *
 */
public class XBasicDataSource extends BasicDataSource {
    
    @Override
    public synchronized void close() throws SQLException {
        DriverManager.deregisterDriver(DriverManager.getDriver(url));
        super.close();
    }
}